import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/article',
    name: 'Article',
    component: () =>
    import(/* webpackChunkName: "articles" */ "../views/Article.vue")
  },
  {
    path: '/archive',
    name: 'Archive',
    component: () =>
    import(/* webpackChunkName: "archive" */ "../views/Archive.vue")
  },
  {
    path: '/project',
    name: 'Project',
    component: () =>
    import(/* webpackChunkName: "project" */ "../views/Project.vue")
  },
  {
    path: '/timeline',
    name: 'Timeline',
    component: () =>
    import(/* webpackChunkName: "timeline" */ "../views/Timeline.vue")
  },
  {
    path: '/message',
    name: 'Message',
    component: () =>
    import(/* webpackChunkName: "message" */ "../views/Message.vue")
  },
  {
    path: '/about',
    name: 'About',
    component: () =>
    import(/* webpackChunkName: "message" */ "../views/About.vue")
  },
]

const router = createRouter({
  history: createWebHistory(`${import.meta.env.BASE_URL}`),
  routes
})

export default router;